A conventional rotary electric machine has a structure in which a cooling gas circulates in the order of a space A provided at the intake side of a fan→a space B surrounding the fan→a gas cooler chamber→a gas cooler→a space C including a stator coil end→a gap between a rotor and a stator and gas passages formed in the rotor and the stator→a space D between the outer periphery of the stator and a casing→the space A, and four gas coolers are provided at the side surface of the rotary electric machine (e.g., Patent Document 1).